/*
 * ListProjectsController.java
 *
 * Project: TECHWATCH - TESTING TECHNOLOGIES
 *
 * Copyright 2008 by ELCA Informatique SA
 * Av. de la Harpe 22-24, 1000 Lausanne 13
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of ELCA Informatique SA. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license
 * agreement you entered into with ELCA.
 */

package ch.elca.training.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import ch.elca.training.model.UrlConstants;
import ch.elca.training.service.EmployeeService;

/**
 * This controller manages all action on the list projects screen.
 * 
 * <script type="text/javascript">printFileStatus ("$URL:
 * https://cvs.elca.ch/subversion/cxnet-portal/trunk/etc/eclipse/preferences_2008_03_03.epf
 * $", "$Revision: 334 $", "$Date: 2008-03-03 16:07:32 +0700 (Mon, 03 Mar 2008)
 * $", "$Author: qkp@ELCA.CH $" "$Id:$" );</script>
 * 
 * @author qkp
 */

@Controller
@RequestMapping(UrlConstants.TEST)
public class TestPageController extends AbstractController {
	
	@Autowired
	private EmployeeService testService;
	
	@Override
	@RequestMapping(method = RequestMethod.GET)
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		testService.saveEmployee(null);
		request.setAttribute("result", "OK");
		return new ModelAndView("TestPageView");
	}

}
